import { configureStore } from '@reduxjs/toolkit'
import { userReducer} from './modules/user'
import { cartReducer } from './modules/cart'
import { shopsReducer } from './modules/shops'
import { addressReducer } from './modules/address'
import { orderSubmitReducer } from './modules/orderSubmit'
import { orderReducer } from './modules/order'


export const store = configureStore({
  reducer: {
    user:userReducer,
    cart:cartReducer,
    shops:shopsReducer,
    address:addressReducer,
    orderSubmit:orderSubmitReducer,
    order:orderReducer
  },
})

export type RootState = ReturnType<typeof store.getState>

export type AppDispatch = typeof store.dispatch